<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('代理报表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label style="width: 80px">用户号：</label>
                            <input type="text" name="userCode"/>
                        </li>
                        <li class="select-time">
                            <label style="width: 80px">创建时间：</label>
                            <input type="text" class="time-input" id="beginDate" placeholder="开始时间" name="beginTime"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endDate" placeholder="结束时间" name="endTime"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:report:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "system/report";

    $(function() {
        var options = {
            url: prefix + "/agentReport",
            exportUrl: prefix + "/export",
            modalName: "用户报表",
            columns: [{
                checkbox: true
            },
                // {
                //     field: 'billcashId',
                //     title: '商家流水记录id',
                //     visible: false
                // },
                {
                    field: 'userCode',
                    title: '用户号'
                },
                {
                    field: 'loginName',
                    title: '用户账号'
                },
                {
                    field: 'balance',
                    title: '已结算金额'
                },
                {
                    field: 'freezeBalance',
                    title: '冻结金额'
                },
                {
                    field: 'orderAmount',
                    title: '入金金额'
                },
                {
                    field: 'orderCharge',
                    title: '手续费'
                },
                {
                    field: 'orderLastAmount',
                    title: '实际金额'
                },
                {
                    field: 'agentCommission',
                    title: '代理佣金'
                },
                // {
                //     field: 'withdrawAmount',
                //     title: '代付总额'
                // },
                // {
                //     field: 'withdrawCharge',
                //     title: '代付手续费'
                // }
                ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>